package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dtos.ArticleHomeDTO;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ApArticleMapper extends BaseMapper<ApArticle> {

    //根据条件查询文章列表
    List<ApArticle> loadNew(@Param("loadtypeLoadNew") Short loadtypeLoadNew, @Param("dto") ArticleHomeDTO dto);

    //根据时间查询热点文章
    public List<ApArticle> selectArticleByDate(@Param("beginDate") String beginDate);
}